*******************************************************
* Lyle 05 Jan 11: 						              *
*	-this program serves as a base shell for all	  *
*	 stata do files					                  *
*******************************************************

********************************
* Standard Stata Configuration *
********************************
clear all
set mem 999m
capture log close
set logtype text
cap cd "C:\Users\ejm5\Google Drive\2015_Research\Unemployment_MILEX"
cap cd "C:\Users\Jordan.Becker\Desktop\GD\2015_Research\Unemployment_MILEX"
cap cd "\\usnatonetapp01.eur.state.sbu\profiles\beckerjm\Desktop\2015_Research\Unemployment_MILEX"
cap cd "C:\Users\jordan.becker\SkyDrive\2017_Research\Unemployment_MILEX"
log using "log\SGP_Figure1.log", replace


*********************
* Prepare Variables *
*********************
use "dta\2017_uem", clear
sort ccode year
xtset ccode year


********************
* Analyze the Data *
********************
set more off
sort ccode year
xtset ccode year





*************DEPLOYABILITY*******************************************************************************
*Figure 3a: Bivariate Relationship between Military Burden and EDA Deployability*
#delimit;
use "dta\2017_uem", clear;
sort ccode year;
xtset ccode year;
corr debt_gdp fri_new;
preserve;
collapse debt_gdp deficit_gdp fri_new edp, by(countryname);
twoway (lfit debt_gdp fri_new) 
(scatter debt_gdp fri_new, msymbol(diamond) mcolor(navy) msize(medsmall) mlabel(countryname)), scheme(sj) note(R= -0.189)
xtitle("Fiscal Rules Index", size(med) margin(medsmall))
ytitle("Debt (%GDP)", size(med) margin(medsmall))
legend(rows(2) size(vsmall) position(2) ring(0) label(1 Fitted) label(2 Observed))
title("Mean Relationship between Fiscal Rules and Debt, 1990-2013", size(med));
graph save output\fiscalrules_fiscalbehavior.gph, replace;
restore;
